package frontend.symtable.symbol;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * 函数内部参数
 *
 * @author 杨凯伟
 * @date 2024/10/16
 */
public class FunctionSymbol extends Symbol {
    public Type retType = new Type();//返回类型 INTTK CHARTK
    public final List<Type> paramTypeList = new ArrayList<>();//形参类型

    public String getIdentType() {
        if (Objects.equals(retType.type, "INTTK"))
            return "IntFunc";
        else if (Objects.equals(retType.type, "CHARTK"))
            return "CharFunc";
        else
            return "VoidFunc";
    }
}
